﻿//=============================================================================
// Project  : NIPO Component Framework
// File    : NewDataEventArgs.cs
// Author  : Bernhard Dieber (Bernhard.Dieber@uni-klu.ac.at)
// Copyright 2010 by Bernhard Dieber
// This code is published under the Microsoft Public License (Ms-PL).  A copy
// of the license should be distributed with the code.  It can also be found
// at the project website: http://NIPO.CodePlex.com.   This notice, the
// author's name, and all copyright notices must remain intact in all
// applications, documentation, and source files.
//=============================================================================

using System;
using System.Collections.Generic;
using System.Text;

namespace NIPO.Data
{
    /// <summary>
    /// The NIPOEventArgs carries data object passed between two plugins (in a <see cref="NIPO.Data.NIPOEventHandler"/>>
    /// </summary>
    public class NIPOEventArgs:EventArgs
    {
        private readonly DataTransferObject _dto;
        private int _senderId;

        /// <summary>
        /// Initializes a new instance of the <see cref="NIPOEventArgs"/> class.
        /// </summary>
        /// <param eventName="dto">The data object to transfer.</param>
        /// <param eventName="senderId">ID of the sender</param>
        public NIPOEventArgs(DataTransferObject dto, int senderId)
        {
            _dto = dto;
            _senderId = senderId;
        }

        /// <summary>
        /// Gets the data.
        /// </summary>
        /// <value>The data.</value>
        public DataTransferObject Data
        {
            get
            {
                return _dto;
            }
        }

        /// <summary>
        /// Gets the sender id.
        /// </summary>
        /// <value>The sender id.</value>
        public int SenderId
        {
            get
            {
                return _senderId;
            }
            set { _senderId = value; }
        }
    }
}